package org.jackysoft.service;

import org.jackysoft.data.IDataProvider;
import org.jackysoft.entity.Variable;
import org.joda.time.DateTime;
import org.springframework.dao.DataAccessException;


public interface VariableService extends IDataProvider<Integer,Variable>{
	Variable get(Long entityId,String name)throws DataAccessException;	
	
	/**
	 * <dd>设置或更新工作流变量
	 * <dd>如果变量存在则更新变量
	 * <dd>否则创建一个新的变量,持久化到数据库
	 * @param variable 工作流变量
	 * 
	 * */
	void setVariable(Variable variable)throws DataAccessException;
	void setVariable(Long entityId,String name,DateTime value)throws DataAccessException;
	
	
	void setVariable(Long entityId,String name,String value)throws DataAccessException;
	void create(Long entityId,String name,String value)throws DataAccessException;
	void create(Long entityId,String name,DateTime value)throws DataAccessException;
	
	

}
